package net.starwifi.duobao.entity;

import javax.persistence.*;

/**
 * 短信模板
 * Created by ruo on 2014/6/10.
 */
@Entity
@Table(name = "duob_sms_template")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "duob_sms_template_sequence")
public class SmsTemplate extends BaseEntity {


    /** 调用code*/
    private String code;

    /* 模版名称*/
    private String name;

    /* 模版内容*/
    private String content ;

    /* 模版说明*/
    private String description ;

    /** 同一个号码，该接口每天允许调用的次数*/
    private int allowCount;

    /** 是否开启短信接口 */
    private boolean open;



    /** 模板code 程序调用时使用*/
    @Column(nullable = false, unique = true,name = "call_code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    /** 模板名称 */
    @Column
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 模板说明 */
    @Column
    @Lob
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    /** 模板内容 */
    @Column(nullable = false)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column
    public int getAllowCount() {
        return allowCount;
    }

    public void setAllowCount(int allowCount) {
        this.allowCount = allowCount;
    }

    @Column
    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }
}
